<?php
	include("global.php");
	$categorys_temp = $db->findall('category');
	while ($row = $db->fetch_array($categorys_temp)) {
		$categorys[$row['id']] = $row['typename'];
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
<link href="css/div.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.js" language="javascript" type="text/javascript"></script>
<script src="js/jquery-1.4.2.js" language="javascript" type="text/javascript"></script>
<script src="js/secondmenu.js" language="javascript" type="text/javascript"></script>
<script type="text/javascript">

</script>
<style type="text/css">
.pages { height:25px; overflow:hidden; text-align:center; line-height:25px; font-family:Verdana; }
.pages a, .pages strong { margin:0 1px; padding:2px 6px; border:1px solid #E4E4E4; text-decoration:none!important; }
.pages a:hover { border-color:#369; color:369 }
.backs { border-color:#369; background:#369; color:#FFF; }
.pages .prev { padding:4px 6px 2px 20px!important; padding:4px 6px 0 20px; background:url(images/arrow_left.gif) no-repeat 9% 50%; font-family:simsun; }
.next { padding:4px 20px 2px 6px!important; padding:4px 20px 0 6px; background:url(images/arrow_right.gif) no-repeat 91% 50%; font-family:simsun; }
</style>
<script type="text/javascript">
	$(function(){
		$("#fenye a").click( function() {
			$(this).addClass("backs");
		});
	});	 
</script>

</head>
<?php
	include("conn/conn.php");
?>
<body>
<div class="box1">
	<?php include("top.php"); ?>
	<embed src="diy/pics/20100623/1.swf" width="1002" height="254" style="position: absolute; left: 18%; top: 130px;"  quality="high" wmode="transparent"  />
			<img src="diy/pics/20100623/huiyuanzhongxin.jpg" border="0" width="1002" />
		  </div>
		</div>
		<div style=" height:10px;">&nbsp;</div>
	
	<div style=" height:20px;">&nbsp;</div>
	<div style=" width:1003px;">
		<div style=" width:200px; overflow:hidden; float:left;">
			
			<?php
				include("ordertree.php");
				include("search.php");
				
			?>
		</div>
		<div style="float:left; width:50px;">&nbsp;</div>
		<div style=" float:left; width:750px;">
			<div style=" width: 750px; background-color:#8DBAE0; height:5px;"></div>
			<div style=" width:200px; height:15px;">&nbsp;</div>
			<div style=" width:750px; height:20px;">
				<span style=" float:left; text-align:left;color:#768DC1; font-size:15px; font-weight:bolder; height:30px;">订单管理</span>
				<span style=" float:right;text-align:right" id="span1"><a href="index.php">首页</a>-><a href="order.php">会员中心</a>-><a href="order.php">订单管理</a></span>
			</div>
			<div style=" height:10px;">&nbsp;</div>
			<div style=" width:750px; text-align:center; height:460px;">
			<?php if(isset($_SESSION['username'])){?> 
			<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#464646" class="newfont03">
          		<tr class="CTitle" >
            		<td height="22" colspan="11" align="center" style="font-size:16px;color: #fff;">订单信息列表</td>
            	</tr>
          		<tr bgcolor="#EEEEEE">
					<td width="10%" align="center" height="30">编号</td>
				   
					<td width="10%" align="center">产品编号</td>
					<td width="10%" align="center">产品名称</td>
				   
					<td width="10%" align="center">价格</td>
					<td width="10%" align="center">数量</td>
				   
					<td width="10%" align="center">总价</td>
					<td width="15%" align="center">订货日期</td>
				   
					<td width="15%" align="center">交货日期</td>
					<td width="10%" align="center">负责人</td>
           		</tr>
            <?php
            //查询出所有数据
          	 $result = mysql_query("select id from order2 where userid='".$_SESSION['username']."'");
          	 //计算出总的数据 num
    		 $total = mysql_num_rows($result);
    		 //设置分页
    		 pageft($total, 10);
    		 //
    		 if ($firstcount < 0) $firstcount = 0;
   				$query = $db->findall("order2 where userid='".$_SESSION['username']."' order by id desc limit  $firstcount, $displaypg");
				
   			while ($row = $db->fetch_array($query)) {
          	?>
          	<tr bgcolor="#FFFFFF">
	    		<td align="center"><?php echo $row['customer_id']; ?></td>
                <td align="center"><?php echo $row['productid']; ?></td>
            	<td align="center"><?php echo $row['products']; ?></td>
                <td align="center"><?php echo $row['price']; ?></td>
            	<td align="center"><?php echo $row['ordernum']; ?></td>
                <td align="center"><?php echo $row['allprice']; ?></td>
            	<td align="center"><?php echo $row['created']; ?></td>
                <td align="center"><?php echo $row['jiaohuotime']; ?></td>
            	<td align="center"><?php echo $row['fuzeren']; ?></td>
            </tr><?php } ?>
          </table>
<?php } else {?>
<a href="login.php" style="font-size: 15px; float:left">请先登录>></a>
<?php }?>
			</div>
			<div style=" height:20px; clear:both;">&nbsp;</div>
			
			<div class="pages" id="fenye">
			
			</div>

		</div>
	</div>
	<?php include("foot.php"); ?>
</div>
</body>
</html>

